/**
 * Created by zero on 2016/1/28.
 */

angular.module('mePointProductMsgServices', [])

  .factory('MePointProductMsg', function ($resource, $rootScope, ENV, Storage) {


    //设置访问接口路径
    var APIUrl = ENV.api;

    //访问获取用户信息的接口
    var getResultMsgResource = $resource(APIUrl + "mePointShop/getResultMsg.do");

    var resultMsgJson;

    return {

      getResultMsgJson : function(){
        return resultMsgJson;
      },

      getResultMsg : function (mnId) {
		  console.log("调用了getResultMsg方法");
        getResultMsgResource.save(
          {
            mn_id : mnId
          },
          function (data) {
            resultMsgJson = data;
            $rootScope.$broadcast('Me.getResultMsg');
          }
        );
      }

    }

});
